package com.freesky.biz.report.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 券每日统计
 */
@Data
@ContentRowHeight(22)
@ColumnWidth(25)
@HeadRowHeight(25)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)//表头样式
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)
public class TReportDayGrant implements java.io.Serializable{

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private String id;

    @ExcelProperty("活动号")
    private String stockId;

    @ExcelProperty("活动名称")
    private String stockName;

    @ExcelProperty("活动类型")
    private String stockType;

    @ExcelProperty("活动状态")
    private String stockStatus;

    @ExcelProperty("日期")
    private String countDay;

    @ColumnWidth(15)
    @ExcelProperty("发放笔数")
    private Long grantCount;

    @ColumnWidth(15)
    @ExcelProperty("发放金额")
    private Double grantAmount;

    @ExcelProperty("渠道")
    private String type;

    @ExcelIgnore
    private String updateTime;

    @ExcelIgnore
    private String projectId;

    @ExcelIgnore
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }
}
